#ifndef __STOPWATCH_H__
#define __STOPWATCH_H__

#include <stdint.h>
#include "plat/nonecopyable.h"

class StopWatch : public NoneCopyable
{
public:
    explicit StopWatch();
    virtual ~StopWatch();

public:
    void Start();
    void ReStart();
    void Stop();
    
    uint32_t ElapsedMilliseconds();
    uint32_t ElapsedMicroSeconds();

private:
    uint32_t m_startMs = 0;
    uint32_t m_endMs = 0;
    uint32_t m_startUs = 0;
    uint32_t m_endUs = 0;

    bool m_isRunning = false;
};

#endif // __STOPWATCH_H__